//
//  Audit.h
//  auditorias
//
//  Created by Mauro on 7/19/13.
//  Copyright (c) 2013 Antilope. All rights reserved.
//

#import <Foundation/Foundation.h>

#define AUDIT_FILE_PREFIX               @"AUDIT_"
#define AUDIT_FILE_MIDFIX_NO_PDV_ID     @"_PDVINTERNALID_"

@interface Audit : NSObject
{
    NSString* internalId;
	NSString* commentText;
	NSString* dateTime;
	NSString* userId;
	NSString* pointOfSellId;
	NSString* pointOfSellInternalId;
	NSArray* photoPaths;
	NSString* auditTypeId;
	bool hasQuestion;
	bool questionAnswer;
}


@property(nonatomic,retain) NSString* internalId;
@property(nonatomic,retain) NSString* commentText;
@property(nonatomic,retain) NSString* dateTime;
@property(nonatomic,retain) NSString* userId;
@property(nonatomic,retain) NSString* pointOfSellId;
@property(nonatomic,retain) NSString* pointOfSellInternalId;
@property(nonatomic,retain) NSArray* photoPaths;
@property(nonatomic,retain) NSString* auditTypeId;
@property(nonatomic,assign) bool hasQuestion;
@property(nonatomic,assign) bool questionAnswer;


- (id) initWithuniqueId: (NSString*) _uniqueId
                 userId:(NSString*) _userId
          pointOfSellId:(NSString*) _pointOfSellId
  pointOfSellInternalId:(NSString*) _pointOfSellInternalId
            commentText:(NSString*) _commentText
            hasQuestion:(bool) _hasQuestion
         questionAnswer:(bool) _questionAnswer
            auditTypeId:(NSString*) _auditTypeId
             photoPaths:(NSArray*) _photoPaths;

- (NSString*) toInternalJSON;
- (NSString*) toJSON;
+ (NSString*) getPDVAndEnding: (NSString*) pointOfSellExternalId;
- (NSString*) getFileName;
+ (NSString*) getPDVInternalIdFromPath: (NSString*)  pathAudit;

@end
